package com.cloudkinto.bo.order.outbound;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.List;

/**
 * 批发单填写装箱信息
 *
 * @author long
 */
@Data
public class TransferOutboundPackBo {
    @ApiModelProperty("出库单id")
    @NotNull(message = "id不可为空")
    private Long id;

    @ApiModelProperty("出库托盘数")
    private Integer palletNum;

    @ApiModelProperty("装箱信息")
    @NotNull(message = "装箱信息不可为空")
    private List<PackageInfo> packInfoList;

    @Data
    public static class PackageInfo {
        private Integer serialNumber;
        private String trackingNumber;
        private Long labelFileId;
        private BigDecimal height;
        private BigDecimal heightBs;
        private BigDecimal length;
        private BigDecimal lengthBs;
        private BigDecimal width;
        private BigDecimal widthBs;
        private BigDecimal weight;
        private BigDecimal weightBs;
        @ApiModelProperty("包裹明细")
        @NotNull(message = "包裹明细不可为空")
        private List<PackageDetail> packageDetailList;
    }

    @Data
    public static class PackageDetail {
        @ApiModelProperty("产品id/-1为箱号")
        private Long productId;

        @ApiModelProperty("sku或箱类号")
        private String skuOrBoxTypeNumber;

        @ApiModelProperty("数量")
        private Integer qty;
    }
}
